import {isObject} from 'lodash'
const merge = function (origin, obj) {
  let res = {}
  if (isObject(origin)) {
    for (let k in origin) {
      if (origin.hasOwnProperty(k)) {
        res[k] = origin[k]
      }
    }
  }
  if (isObject(obj)) {
    for (let j in obj) {
      if (obj.hasOwnProperty(j)) {
        res[j] = obj[j]
      }
    }
  }
  return res
}

export {merge}
